<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
        #div1{
        	width:100px;height: 150px;position: absolute;bottom:0;right:0;background: green;
        }
	</style>
	<script type="text/javascript">
        window.onscroll = function(){
        	var oDiv = document.getElementById('div1');
        	
        	var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;

        	oDiv.style.top = document.documentElement.clientHeight-oDiv.offsetHeight+scrollTop+'px';

        }
	</script>
</head>
<body>

    <div id="div1"></div>
	
</body>
</html>